<?php exit;
    if($isfirst){
	if (empty($threadext_data)) /*有可能前面已经提取出内容了,不必重复查询*/
	{
		$tecol = array('firstimg', 'source', 'sourceurl', 'expired');
		if ($IsThreadExtension){
            array_push($tecol, 'keywords', 'metadesc', 'relatedlinks','relatedfids','editornote', 'reviseerr', 'aflags');
            if($IsAdjustViewTemplate){
                array_push($tecol, 'viwetemplate');
            }
        }
		$threadext_data = db_find_one($theadext_table, array('tid' => $tid), array(), $tecol);
	}
	$relatedlinks_placeholder = addslashes('关联文章列表,每行一个,格式:' . (isset($LabelCfg['RelatedLinkTemplate']['line']) ? $LabelCfg['RelatedLinkTemplate']['line'] : '[URL]{标题}') . ',注:<>项可以忽略,行首可以加标识符,+:必须包含,-:自动排除,//:为注释;不填时自动分析生成');


	$keywords = $metadesc = $firstimg = $source = $sourceurl = $editornote = $reviseerr = $relatedlinks = $relatedfids = $viwetemplate = '';
	$expired = $aflags = 0; 
	if ($threadext_data) {
		if (isset($threadext_data['keywords'])) $keywords = $threadext_data['keywords'];
		if (isset($threadext_data['metadesc'])) $metadesc = $threadext_data['metadesc'];
		if (isset($threadext_data['relatedlinks'])) $relatedlinks = $threadext_data['relatedlinks'];
		if (isset($threadext_data['relatedfids'])) $relatedfids = $threadext_data['relatedfids'];
		if (isset($threadext_data['firstimg'])) $firstimg = $threadext_data['firstimg'];
		if (isset($threadext_data['expired'])) {
			$expired = $threadext_data['expired'];
			if ($expired != 0)
				$GLOBALS['expiredFmt'] = Date('Y-m-d H:i', $expired);
			else
				$GLOBALS['expiredFmt'] = '';
		}
		if (isset($threadext_data['source'])) $source = $threadext_data['source'];
		if (isset($threadext_data['sourceurl'])) $sourceurl = $threadext_data['sourceurl'];
		if (isset($threadext_data['editornote'])) $editornote = $threadext_data['editornote'];
		if (isset($threadext_data['reviseerr'])) $reviseerr = $threadext_data['reviseerr'];
		if (isset($threadext_data['aflags'])) $aflags = $threadext_data['aflags'];
        if (isset($threadext_data['viwetemplate'])) $viwetemplate = $threadext_data['viwetemplate'];
	}
}
$trank = $prank = '';
 if(!$IsAdjustPostSortRank)
        unset($trank,$prank);//没有权限
    else{
        if($isfirst) {
            $trank = $thread['trank'];
            if ($trank != 0) $trank = intval($trank);
			unset($prank);
        }
        else{
            $prank = $post['prank'];
            if ($prank != 0) $prank = intval($prank);
			unset($trank);
        }
    }
    $ThreadViewTemplateList = $PostViewTemplateList = null;
    if($IsAdjustViewTemplate){
        $ThreadViewTemplateList = &GetViewTemplateList('thread');
        $PostViewTemplateList = &GetViewTemplateList('post');
    }
